package routers

import (
	"github.com/gin-gonic/gin"
	"muziai-server/api"
	"muziai-server/middleware"
)

func SessionRouter(r *gin.RouterGroup) {
	app := api.ApiApp.SessionApi
	middleware := middleware.MiddlewareAuth{}

	r.POST("session", middleware.MiddlewareAuth(), app.SessionCreateView)
	r.GET("session", middleware.MiddlewareAuth(), app.SessionListView)
	r.GET("session/:id", middleware.MiddlewareAuth(), app.SessionDetailView)
	r.PUT("session/title", middleware.MiddlewareAuth(), app.SessionUpdateTitleView)
	r.PUT("session", middleware.MiddlewareAuth(), app.SessionUpdateTitleView)
	r.DELETE("session", middleware.MiddlewareAuth(), app.SessionRemoveView)

}
